import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage'

//查询设备
const getDevice = params => getAction('/crm_device/crmDevice/list', params)
//编辑细纱日计划
const editDevice = params => putAction('/crm_daily_plan_spun_yarn/crmDailyPlanSpunYarn/edit', params)
//编辑络筒日计划
const editDeviceSpooling = params => putAction('/crm_daily_plan_spooling/crmDailyPlanSpooling/edit', params)
//编辑前纺日计划
const editDailyPlanPreSpin = params => putAction('/crm_daily_plan_pre_spin/crmDailyPlanPreSpin/edit', params)
//查询细纱日计划
const getDailyPlanSpunYarn = params => getAction('/crm_daily_plan_spun_yarn/crmDailyPlanSpunYarn/list', params)
//编辑细纱排班
const editSchedulingSpunYarn = params => putAction('/crm_scheduling_spun_yarn/crmSchedulingSpunYarn/edit', params)
//查询前纺日计划
const getDailyPlanPreSpin = params => getAction('/crm_daily_plan_pre_spin/crmDailyPlanPreSpin/list', params)
//查询络筒日计划
const getDailyPlanSpooling = params => getAction('/crm_daily_plan_spooling/crmDailyPlanSpooling/list', params)
//编辑前纺排班
const editSchedulingPreSpin = params => putAction('/crm_daily_plan_pre_spin/crmDailyPlanPreSpin/edit', params)
//编辑前纺排班
const editSchedulingPreSpintyxb = params => putAction('/crm_scheduling_pre_spin/crmSchedulingPreSpin/edit', params)
//编辑络筒排班
const editSchedulingSpooling = params => putAction('/crm_scheduling_spooling/crmSchedulingSpooling/edit', params)
//班制查询
const getShiftSystem = params => getAction('/crm_shift_system/crmShiftSystem/list', params)
//班制删除
const deleteShiftSystem = params => getAction('/crm_shift_system/crmShiftSystem/delete', params)
//定额表细纱
const productTypeSpunYarn = params => getAction('/crm_product_type_spun_yarn/crmProductTypeSpunYarn/list', params)
//定额表粗纱
const productTypeRoveList = params => getAction('/crm_product_type_rove/crmProductTypeRove/list', params)
//定额表络筒
const productTypeSpoolingList = params => getAction('/crm_product_type_spooling/crmProductTypeSpooling/list', params)
//查询车间
const getWorkShopOptionData = params => getAction('sys/dictItem/list', params)
//查询公共的
const getPublicData = (url, params) => getAction(url, params)

//查询轮班管理二级的
const getShiftSec = params => getAction('/crm_shift_sec/crmShiftSec/list', params)

//生成细纱报表
const getGenerateSalary = params =>
  getAction('/crm_salary_excel_spun_yarn/crmSalaryExcelSpunYarn/generateSalaryDataSpunYarn', params)
//生成络筒报表
const getGenerateSalarySpooling = params =>
  getAction('/crm_salary_excel_spooling/crmSalaryExcelSpooling/generateSalaryDataSpooling', params)

//生成清花报表
const getGenerateSalaryDataBlowing = params =>
  getAction('/crm_salary_excel_blowing/crmSalaryExcelBlowing/generateSalaryDataBlowing', params)

//生成梳棉报表
const getGenerateSalaryDataCotton = params =>
  getAction('/crm_salary_excel_cotton/crmSalaryExcelCotton/generateSalaryDataCotton', params)

//生成并条报表
const getGenerateSalaryDataDrawing = params =>
  getAction('/crm_salary_excel_drawing/crmSalaryExcelDrawing/generateSalaryDataDrawing', params)

//生成粗纱报表
const getGenerateSalaryDataRove = params =>
  getAction('/crm_salary_excel_rove/crmSalaryExcelRove/generateSalaryDataRove', params)

//生成推粗纱报表
const getGenerateSalaryDataPushRove = params =>
  getAction('/crm_salary_excel_rove_push_rove/crmSalaryExcelRovePushRove/generateSalaryDataRove', params)

//复制昨日日计划/排班
const copyYesterdayDailyPlan = params =>
  getAction('/crm_daily_plan_spun_yarn/crmDailyPlanSpunYarn/copyYesterdayDailyPlan', params)

//复制昨日日计划/排班-新
const copyYesterdayDailyPlanNew = params =>
  getAction('/crm_daily_plan_spun_yarn/crmDailyPlanSpunYarn/copyYesterdayScheduling', params)

//大屏二级实时数据
const getMachineRealData = params =>
  getAction('/ds_device_real_time_status/dsDeviceRealTimeStatus/singleMachineRealTimeData', params)

//动力柜详情统计数据
const getPowerDetailsStatistics = params =>
  getAction('/ds_device_real_time_status/dsDeviceRealTimeStatus/powerDetailsStatistics', params)

//动力柜详情明细数据
const powerDetails = params => getAction('/ds_device_real_time_status/dsDeviceRealTimeStatus/powerDetails', params)

//根据id查询空调时间轴信息
const getWenShiGroupStateList = params =>
  getAction('/crm_temperature_humidity_sec/crm_temperature_humidity_sec/list', params)

//获取1.5级详情
const getProcessDetails = params =>
  getAction('/ds_device_real_time_status/dsDeviceRealTimeStatus/processDetails', params)

export {
  getDevice,
  editDevice,
  editDeviceSpooling,
  editDailyPlanPreSpin,
  getDailyPlanSpunYarn,
  editSchedulingSpunYarn,
  getDailyPlanSpooling,
  editSchedulingSpooling,
  getShiftSystem,
  deleteShiftSystem,
  getDailyPlanPreSpin,
  editSchedulingPreSpin,
  editSchedulingPreSpintyxb,
  productTypeSpunYarn,
  productTypeRoveList,
  productTypeSpoolingList,
  copyYesterdayDailyPlan,
  copyYesterdayDailyPlanNew,
  getWorkShopOptionData,
  getPublicData,
  getShiftSec,
  getGenerateSalary,
  getGenerateSalarySpooling,
  getGenerateSalaryDataBlowing,
  getGenerateSalaryDataCotton,
  getGenerateSalaryDataDrawing,
  getGenerateSalaryDataRove,
  getGenerateSalaryDataPushRove,
  getMachineRealData,
  getPowerDetailsStatistics,
  powerDetails,
  getWenShiGroupStateList,
  getProcessDetails
}
